{* $Id$ *}
{include_core file="admin/lib/header.html" title="合伙人下单数据"}
<div class="page-header border-bottom clearfix">
    <h2 class="left">合伙人下单数据<span>搜索查看对应时间段合伙人进(品类/卖品)明细</span></h2>
</div>
<div class="search-form js_advancedForm">
    <form action="{AnUrl('records_center/admin/agency')}" method="get">
        <p style="margin-bottom: 10px;">
            <label for="" class="search-f-label">合伙人：</label>
            {$agency_id = URLTracker::val('search_filter', 'agency_id')}
            {if !isset($AGENCY_LIST)}
            {$AGENCY_LIST = user_helper::get_all_dealers_info()}
            {/if}
            <select placeholder="请选择合伙人" class="add-f-ipt1" id="suggest_agency" name="search_filter[agency_id]">
                <option value="0" {if $agency_id== 0} selected="selected" {/if}>请选择合伙人</option>
                {foreach $AGENCY_LIST as $k => $v}
                <option value="{$v.id}" {if $v.id== $agency_id} selected="selected" {/if}>{$v.realname}({$v.mobile})</option>
                {/foreach}
            </select>
        </p>
        <p class="js-time-range-check">
            <label for="" class="search-f-label">时间：</label>
            <input type="text" class="search-f-ipt1 search-f-ipt2 js-date-picker js-start-time"
                   name="search_filter[start_date]"
                   value="{URLTracker::val('search_filter', 'start_date')}">
            <span class="search-f-line"></span>
            <input type="text" class="search-f-ipt1 search-f-ipt2 js-date-picker js-end-time"
                   name="search_filter[end_date]"
                   value="{URLTracker::val('search_filter', 'end_date')}">
        </p>
        <p>
            <label for="" class="search-f-label">展示明细：</label>
            <input type="checkbox" name="search_filter[show_goods]" value="1"{if 1 == URLTracker::val('search_filter', 'show_goods')} checked="checked"{/if}>
        </p>
        <p>
            <label for="" class="search-f-label"></label>
            <button type="submit" class="btn btn-success btn-xs js_searchBtn">搜索</button>
        </p>
    </form>
</div>
<!--start:列表-->
<table class="list-table">
    <thead>
    <tr>
        <th rowspan="2" style="min-width: 80px">日期</th>
        {foreach $title_column as $k => $dd}
        {if is_array($dd)}
        <th colspan="2" style="text-align: center" class="highlight left-border">{$dd[0]}</th>
        {foreach $dd[1] as $v}
        <th colspan="2" style="text-align: center" class="border">{$v}</th>
        {/foreach}
        {else}
        <th rowspan="2" style="text-align: right">{$dd}</th>
        {/if}
        {/foreach}
    </tr>
    <tr>
        {foreach $title_column as $k => $dd}
        {if is_array($dd)}
        <th style="text-align: center" class="highlight left-border">数量</th>
        <th style="text-align: center" class="highlight border">价格</th>
        {foreach $dd[1] as $v}
        <th style="text-align: center" class="border">数量</th>
        <th style="text-align: center" class="border">价格</th>
        {/foreach}
        {/if}
        {/foreach}
    </tr>
    </thead>
    <tbody>
    {foreach $data as $k => $row}
    <tr>
        <td>{$k}</td>
        {foreach $row as $dd}
        {if is_array($dd)}
        <td style="text-align: right" class="highlight left-border">{$dd[0]}</td>
        <td style="text-align: right" class="highlight">{$dd[1]}</td>
        {foreach $dd[2] as $v}
        <td style="text-align: right">{$v[0]}</td>
        <td style="text-align: right">{$v[1]}</td>
        {/foreach}
        {else}
        <td style="text-align: right">{$dd}</td>
        {/if}
        {/foreach}
    </tr>
    {foreachelse}
    <tr>
        <td class="txtleft" colspan="8">暂无数据</td>
    </tr>
    {/foreach}
    </tbody>
</table>
<!--end:列表-->
{include_core file="module/suggestion.html" id="suggest_agency"}
{include_core file="module/search_form_check.html"}
{include_core file="admin/lib/footer.html"}
